import React,{ Component } from 'react'
import LoginForm from '../LoginForm'
import RegisterForm from '../RegisterForm'


class LoginRegForm extends Component{
    state={
        visible: true
    };

    handleClick = ()=>{
        this.setState({
            visible: !this.state.visible
        })
    };

    render(){
        return(
            <div className={this.props.className} style={this.props.style}>
                {
                    this.state.visible
                        ? <LoginForm onClick={this.handleClick}/>
                        : <RegisterForm onClick={this.handleClick}/>
                }
            </div>
        );
    }
}

export default LoginRegForm;

